﻿namespace DslEditorPowerToy.Controls.Languages
{
    using DslEditorPowerToy.Controls;
    using Microsoft.VisualStudio.Shell.Interop;
    using System;
    using System.Collections;
    using System.ComponentModel.Design;

    public class SelectionProvider : ISelectionProvider
    {
        private ISelectionService _selectionService;

        [CLSCompliant(false)]
        public SelectionProvider(ISelectionContainer container)
        {
            this._selectionService = new SelectionContainerSelectionService(container);
        }

        public SelectionProvider(ISelectionService service)
        {
            this._selectionService = service;
        }

        public ICollection GetSelectedComponents()
        {
            return this._selectionService.GetSelectedComponents();
        }

        public object PrimarySelection
        {
            get
            {
                return this._selectionService.PrimarySelection;
            }
        }

        public int SelectionCount
        {
            get
            {
                return this._selectionService.SelectionCount;
            }
        }
    }
}

